﻿
Imports System.Net.Mail

Public Class Email
    Dim objMail As New MailMessage

    Public Sub SendMail(ByVal recipient As String, ByVal cc As String, _
                             ByVal sender As String, ByVal subject As String, ByVal body As String)

        objMail.To.Add(New MailAddress(recipient))
        objMail.CC.Add(New MailAddress(cc))
        objMail.From = New MailAddress(sender)
        objMail.Subject = subject
        objMail.Body = body
        objMail.IsBodyHtml = True
        objMail.Priority = MailPriority.Normal

        'Send the mail message using SMTP
        Dim smtpMailClient As New SmtpClient("smtp.temple.edu")
        smtpMailClient.Send(objMail)

    End Sub

End Class

